# 舵机控制例子
#
# 这个例子展示了如何使用OpenMV来控制舵机

import time
from pyb import Servo

s1 = Servo(1) # P7
s2 = Servo(2) # P8

def steergear_rotating():
    for i in range(2500):
        s1.pulse_width(500 + i)
       # s2.pulse_width(1999 - i)
        time.sleep_ms(10)
    for i in range(1500):
        s2.pulse_width(700 + i)
        time.sleep_ms(10)
    s2.pulse_width(1200)
    

while(True):
    steergear_rotating()
  
   